

#ifndef UC_GEELL2D_H
#define UC_GEELL2D_H

#include "zgecurv2d.h"
#include "zgevec2d.h"
#include "zgepnt2d.h"
#include "zgeponc2d.h"
#include "zgeintrvl.h"
#pragma pack (push, 8)

class UcGeCircArc2d;
class UcGePlanarEnt;
class UcGeEllipArc2d;
class UcGeLinearEnt2d;

class
GE_DLLEXPIMPORT
UcGeEllipArc2d : public UcGeCurve2d
{
public:
    UcGeEllipArc2d();
    UcGeEllipArc2d(const UcGeEllipArc2d& ell);
    UcGeEllipArc2d(const UcGeCircArc2d& arc);
    UcGeEllipArc2d(const UcGePoint2d& cent, const UcGeVector2d& majorAxis,
                   const UcGeVector2d& minorAxis, double majorRadius,
                   double minorRadius);
    UcGeEllipArc2d(const UcGePoint2d& cent, const UcGeVector2d& majorAxis,
                   const UcGeVector2d& minorAxis, double majorRadius,
                   double minorRadius, double startAngle, double endAngle);

    ZSoft::Boolean intersectWith (const UcGeLinearEnt2d& line, int& intn,
                                  UcGePoint2d& p1, UcGePoint2d& p2,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean isCircular    (const UcGeTol& tol = UcGeContext::gTol) const;

    ZSoft::Boolean isInside      (const UcGePoint2d& pnt,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    UcGePoint2d    center        () const;
    double         minorRadius   () const;
    double         majorRadius   () const;
    UcGeVector2d   minorAxis     () const;
    UcGeVector2d   majorAxis     () const;
    double         startAng      () const;
    double         endAng        () const;
    UcGePoint2d    startPoint    () const;
    UcGePoint2d    endPoint      () const;
    ZSoft::Boolean isClockWise   () const;

    UcGeEllipArc2d& setCenter     (const UcGePoint2d& cent);
    UcGeEllipArc2d& setMinorRadius(double rad);
    UcGeEllipArc2d& setMajorRadius(double rad);
    UcGeEllipArc2d& setAxes       (const UcGeVector2d& majorAxis, const UcGeVector2d& minorAxis);
    UcGeEllipArc2d& setAngles     (double startAngle, double endAngle);
    UcGeEllipArc2d& set           (const UcGePoint2d& cent,
                                   const UcGeVector2d& majorAxis,
                                   const UcGeVector2d& minorAxis,
                                   double majorRadius, double minorRadius);
    UcGeEllipArc2d& set           (const UcGePoint2d& cent,
                                   const UcGeVector2d& majorAxis,
                                   const UcGeVector2d& minorAxis,
                                   double majorRadius, double minorRadius,
                                   double startAngle, double endAngle);
    UcGeEllipArc2d& set           (const UcGeCircArc2d& arc);

    UcGeEllipArc2d& operator =    (const UcGeEllipArc2d& ell);
};

#pragma pack (pop)
#endif

